package cn.ddiancan.xddcloud.psc.base.feign;

import java.util.List;

import cn.ddiancan.xddcloud.common.entity.CommonResult;
import cn.ddiancan.xddcloud.psc.base.domain.DeptEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "DeptRemoteClientService", value = DeptRemoteClientService.targetService)
public interface DeptRemoteClientService {

    String targetService = "xddcloud-psc";

    @GetMapping("/psc/dept/list")
    CommonResult<List<DeptEntity>> getDeptList();

    /**
     * 获取部门详情
     *
     * @param deptId 部门id
     * @return 部门详情信息
     */
    @GetMapping("/psc/dept/get/{deptId}")
    CommonResult<DeptEntity> getDept(@PathVariable("deptId") String deptId);

    /**
     * 批量获取部门列表
     *
     * @param deptIds
     * @return
     */
    @PostMapping("/psc/dept/batch-dept")
    CommonResult<List<DeptEntity>> getBatchDeptList(@RequestBody List<String> deptIds);
}
